package cn.wolfcode.luowowo.acticle.mapper;

import cn.wolfcode.luowowo.acticle.domain.StrategyDetail;
import cn.wolfcode.luowowo.acticle.query.StrategyDetailQuery;
import cn.wolfcode.luowowo.acticle.vo.StrategyStatisVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface StrategyDetailMapper {
    int deleteByPrimaryKey(Long id);

    int insert(StrategyDetail record);

    StrategyDetail selectByPrimaryKey(Long id);

    List<StrategyDetail> selectAll();

    int updateByPrimaryKey(StrategyDetail record);

    List<StrategyDetail> selectForList(StrategyDetailQuery qo);

    void updateState(@Param("id") Long id, @Param("state") int state);

    String selectTagsByDetailId(Long id);

    List<Map<String, Object>> selectDetailByStrategyId(Long strategyId);

    List<Map<String,Object>> selectStrategyDetailByIds(List<Long> ids);

    List<Long> selectUserFavorList(Long sid);

    void updateStatis(StrategyStatisVO vo);

    void deleteFavor(Long id);

    void insertFavor(@Param("sid") Long sid, @Param("uid") Long uid);

    List<Map<String, Object>> selectDetails();
}